<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>领取卡券</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="author" content="runoob">
    <link rel="stylesheet" href="__STATIC_URL__/static/mobile/css/weui.css" />
    <script src="__STATIC_URL__/static/js/jquery-2.1.4.min.js"></script>

</head>

<body style="">

<!------------------导航-------------------------->
<section>

<!--------------------------主要内容区域------------------------------------->
    <div class="container" id="container" style="margin: 0;text-align: center">
        <div class="page__bd" style="margin-top: 30%">
            <div class="weui-loadmore">
                <i class="weui-loading" style="width: 60px;height: 60px;"></i>

            </div>
            <div class="weui-msg__text-area">
                <h2 class="weui-msg__title">正在加载</h2>
                <p class="weui-msg__desc"></p>
            </div>
        </div>

    </div>
</section>
<script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script>
    wx.config({
        debug: false,
        appId: "{$jssdk['appId']}",
        timestamp: "{$jssdk['timestamp']}",
        nonceStr: "{$jssdk['nonceStr']}",
        signature: "{$jssdk['signature']}",
        jsApiList: [
            'addCard'
        ]
    });
    wx.ready(function () {
        wx.checkJsApi({
            jsApiList: [
                'addCard',
            ],
        });
       wx.addCard({
            cardList: [
                {
                    cardId: '{$card.card_id}',
                    cardExt: '{$card.addcard}'
                }
            ],
           success: function (res) {
               window.location.replace("{:url('mobile/cardget/cardgetsuccess')}")
           },
        });

    })
</script>
</body>
</html>
